From: Florian Müllner Date: Fri, 27 Feb 2015 01:09:02 +0000 (+0100) Subject: dash: Fix leaking signal connections X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~1630 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=714bc5f10310365f46c06d162e40b3afd715e784;p=gnome-shell.git dash: Fix leaking signal connections The overview has a longer life-time than dash items, so we are leaking a signal connection each time an item is destroyed. Spotted by Michele () https://bugzilla.gnome.org/show_bug.cgi?id=744575 --- diff --git a/js/ui/dash.js b/js/ui/dash.js index 146480c30..2f48a7add 100644 --- a/js/ui/dash.js +++ b/js/ui/dash.js @@ -519,10 +519,13 @@ const Dash = new Lang.Class({ this._syncLabel(item, appIcon); })); - Main.overview.connect('hiding', Lang.bind(this, function() { + let id = Main.overview.connect('hiding', Lang.bind(this, function() { this._labelShowing = false; item.hideLabel(); })); + item.child.connect('destroy', function() { + Main.overview.disconnect(id); + }); if (appIcon) { appIcon.connect('sync-tooltip', Lang.bind(this, function() {